<%--
  Created by IntelliJ IDEA.
  User: KaiFaBu010
  Date: 2017-11-16
  Time: 10:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page isELIgnored="false" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>注册--游戏工作室记账系统</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <link rel="shortcut icon" href="/images/favicon.ico"/>
    <link href="/js/jquery-easyui-1.5.3/themes/default/easyui.css" rel="stylesheet"/>
    <link href="/js/jquery-easyui-1.5.3/themes/icon.css" rel="stylesheet"/>
    <link href="/css/default.css" rel="stylesheet"/>
    <link href="/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/js/nice-validator-1.1.2/jquery.validator.css" rel="stylesheet" />
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <script src="/js/jquery-1.12.4.min.js"></script>
    <script src="/js/jquery-easyui-1.5.3/jquery.easyui.min.js"></script>
    <script src="/js/jquery-easyui-1.5.3/locale/easyui-lang-zh_CN.js"></script>
    <script src="/js/nice-validator-1.1.2/jquery.validator.min.js"></script>
    <script src="/js/nice-validator-1.1.2/local/zh-CN.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"
            integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
            crossorigin="anonymous"></script>
    <script src="/js/common.js"></script>
    <!--[if lt IE 9]>
    <script src="/js/html5shiv.min.js"></script>
    <script src="/js/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
        body {
            background: url(../../images/loginbackground.gif) 50% 70px no-repeat;
        }

        .sysname {
            margin: 0 auto;
            width: 1000px;
            height: 120px;
            line-height: 120px;
        }

        .loginBox {
            width: 394px;
            height: auto;
            margin-left: 570px;
            background: #fafafa;
            padding-top: 40px;
            padding-bottom: 20px;
            border-radius: 6px;
            -moz-border-radius: 6px;
        }
    </style>
</head>
<body>
<!--[if lte IE 9]>
<div style="position:absolute;z-index:999;text-align:center;width:100%;font-size:16px;background:#dddddd;padding:40px 0;">
    您还在使用老版本的IE，正常使用系统前请升级您的浏览器到新版本 <a target="_blank" href="https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads" style="color:#ff6a00;">点击升级</a>
    <br />
    我们强烈建议您使用以下一种浏览器登录系统：
    <a href="https://www.mozilla.org/zh-CN/firefox/new/?utm_medium=referral&utm_source=firefox-com" target="_blank" style="color:#ff6a00;">火狐 FireFox</a>
    &nbsp;
    <a href="http://down.tech.sina.com.cn/content/40975.html" target="_blank" style="color:#ff6a00;">谷歌 Chrome</a>
    &nbsp;
    <a href="http://chrome.360.cn/" target="_blank" style="color:#ff6a00;">360极速浏览器</a>
    &nbsp;
    <a href="http://se.360.cn/" target="_blank" style="color:#ff6a00;">360安全浏览器</a>
</div>
<![endif]-->
<div class="container-fluid">
    <form id="goRegistinfo" action="#" method="post" class="form-horizontal">
        <div class="col-md-12">
            <div class="sysname">
                <h3>游戏工作室记账系统</h3>
            </div>
            <div style="margin:0 auto;width:1000px;">
                <div class="loginBox col-md-12">
                    <div class="form-group">
                        <label for="LoginName" class="col-md-3 control-label">用户名</label>
                        <div class="col-md-8">
                            <input class="easyui-validatebox"  data-options="required:true" validType="username"  id="loginname" name="loginname" placeholder="登录账号"  >
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="PassWord" class="col-md-3 control-label">密&#12288;码</label>
                        <div class="col-md-8">
                            <input class="easyui-validatebox" data-options="required:true,validType:['pasword','unnormal']"    id="password" name="password" placeholder="登录密码" maxlength="15">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="PassWord" class="col-md-3 control-label">姓&#12288;名</label>
                        <div class="col-md-8">
                            <input class="easyui-validatebox" data-options="required:true"  validType="chinese"  id="relname" name="relname" placeholder="真实姓名" maxlength="8">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="PassWord" class="col-md-3 control-label">用户邮箱</label>
                        <div class="col-md-8">
                            <input class="easyui-validatebox"  validType="email" data-options="required:true"  id="email" name="email" placeholder="用户邮箱" >
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-md-offset-3 col-md-9">
                            <button id="goRegistinfo_btn" type="button" class="btn btn-success">确认</button>
                            <a href="/home/registinfo" class="btn btn-default">重置</a>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-offset-3 col-md-9">
                            <p class="text-danger">  >>${registinfomsg}<<  </p>
                        </div>
                    </div>
                </div>
            </div>
            <div style="clear:both;"></div>
            <div class="text-center" style="margin-top:40px;">
                技术支持：小任&#12288;18781073687
            </div>
        </div>

    </form>
</div>


<script>
    $(function(){



        $('#goRegistinfo_btn').click(function(e){
            e.preventDefault();
            e.stopPropagation();

            if(!$("#goRegistinfo").form('validate')){
                $.messager.show({
                    title:'用户注册',
                    msg:"注册信息不符规则",
                    timeout:5000,
                    showType:'slide'
                });
                return
            }
            var form = $("#goRegistinfo").serializeArray();
            var tojson= formtojson(form);
            $.ajax({
                type:"POST",
                url:"/home/goRegistinfo",
                data:{
                    "insetlist":tojson
                },
                dataType:"json",
                success: function(data){
                    $.messager.show({
                        title:'用户注册',
                        msg:data["msg"],
                        timeout:5000,
                        showType:'slide'
                    });
                }

            });

        });



    })

    $.extend($.fn.validatebox.defaults.rules, {
        minLength: {
            validator: function (value, param) {
                return value.length >= param[0];
            },
            message: '请输入至少（2）个字符.'
        },
        length: { validator: function (value, param) {
            var len = $.trim(value).length;
            return len >= param[5] && len <= param[16];
        },
            message: "输入内容长度必须介于{5}和{16}之间."
        },
        chinese: {// 验证中文
            validator: function (value) {
                return /^[\Α-\￥]+$/i.test(value);
            },
            message: '请输入中文'
        },
        unnormal: {// 验证是否包含空格和非法字符
            validator: function (value) {
                return /.+/i.test(value);
            },
            message: '输入值不能为空和包含其他非法字符'
        },
        username: {// 验证用户名
            validator: function (value) {
                return /^[a-zA-Z][a-zA-Z0-9_]{3,15}$/i.test(value);
            },
            message: '用户名不合法（字母开头，允许6-16字节，允许字母数字下划线）'
        },
        pasword: {// 验证密码
            validator: function (value) {
                return /^[a-zA-Z0-9_]{5,15}$/i.test(value);
            },
            message: '密码'
        },
        name: {// 验证姓名
            validator: function (value) {
                return /^[\Α-\￥]+$/i.test(value);
            },
            message: '请输入姓名'
        }

    });


</script>



</body>
</html>
